#ifndef __M_MSG_H__
#define __M_MSG_H__

#include "util.hpp"
#include "level.hpp"
#include <thread>

namespace wmhLog
{
    struct message
    {
        time_t _ctime;//日志产生时间
        logLevel::value _level;//日志等级
        size_t _line;//行号
        std::thread::id _tid;//线程id
        std::string _file;//文件名
        std::string _logger;//日志器名称
        std::string _paylog;//日志主体

        message(logLevel::value level,size_t line,const std::string file,
                const std::string logger,const std::string msg)
            :_ctime(util::Date::getTime()),_level(level),_line(line),
            _tid(std::this_thread::get_id()),
            _file(file),_logger(logger),_paylog(msg)

        {

        }
    };
    
}

#endif